#include "State_Single.h"

State_Single* State_Single::init = 0;

void State_Single::Enter()
{
	cout << "Entering State_Single\n";
	choice = '0';
}

void State_Single::Execute(Game* g)
{
	cout << "Executing Start_Single\n";
	cout << "CAMPAIGN\n";
	cout << "1. New Game\n";
	cout << "2. Load Game\n";
	cout << "3. Return\n";
	cout << "Make your choice: ";
	cin >> choice;
	switch(choice)
	{
	case '1':
		{
			cout << "New Game selected\n";
			g->changeState(NewGame::Instance());
		}
		break;
	case '2':
		{
			cout << "Load Game selected\n";
			g->changeState(LoadGame::Instance());
		}
		break;
	case '3':
		{
			cout << "Returning to main menu\n";
			g->changeState(State_Menu::Instance());
		}
		break;
	default:
		{
			cout << "That was not a choice\n";
		}
		break;
	}
}

void State_Single::Exit()
{
	cout << "Exiting Start_Single\n";
}

State_Single* State_Single::Instance()
{
	if(init == 0)
	{
		init = new State_Single();
	}
	return init;
}